import myAxios from './myAxios'
///import { useNavigate}  from 'react-router-dom'
//import {BASE_URL} from '../config/index'
import { URL, meshLog, SPRemove, SPGet, SPSet } from '../config'
import axios from "axios"
import { exportTimeStr } from '../utils/dataUtils'
// axios..post('http://localhost:3000/login', { "deviceName": "iPhone max", "deviceNo": "F1A53188C48BD4ACCEAD53725C
// )
// .then((result) => {
// meshLog(res
// meshLog(11);
// })
// .catch((resaon) => {
// meshLog(resao
// meshLog(1);
// }) 这种方式是直接在组件中发
// export const reqLogin = (passwd, email) => myAxios.post('/spring/login', { passwd, email })
// export const homeDeng = (token, email, meshUUID, addr, opCode, value) => myAxios.post('/spring/light', { token, email, meshUUID, addr, opCode, value })
// export const quanKong = (token, email, meshUUID, addr, opCode) => myAxios.post('/spring/light', { token, email, meshUUID, addr, opCode })
export const reqLogin = (phone, password) => myAxios.post(URL + '/manage/login', { phone, password })
export const getMqtt = (date) => myAxios.post(URL + '/manage/get_mqtt', { date })
export const getMessage = () => myAxios.post(URL + '/manage/get_message', {})
export const getUserInfo = (line, page, items) => myAxios.post(URL + '/manage/get_user_info', { line, page, items })
export const getMessageInfo = (page, items) => myAxios.post(URL + '/manage/get_message_info', { page, items })
export const delete_reply_message = (status, msgID, msg) => myAxios.post(URL + '/manage/delete_reply_message', { status, msgID, msg })
export const getVoice = (page, items) => myAxios.post(URL + '/manage/get_voice', { page, items })
export const getOnlineInfo = (line) => myAxios.post(URL + '/manage/get_online_info', { line })
export const getLogInfo = (page, items) => myAxios.post(URL + '/manage/get_log_info', { page, items })
export const getRestaurantLogInfo = (page, items) => myAxios.post(URL + '/manage/get_restaurantLog_info', { page, items })
export const getOfflineLight = (time, area) => myAxios.post(URL + '/manage/get_offline_light', { time, area })
export const insertAdInfo = (title, img, onClick) => myAxios.post(URL + '/manage/insert_ad_info', { title, img, onClick })
export const insertGameInfo = (game_line, status, img, time11, time12, time2, time3, time41, time42) => myAxios.post(URL + '/manage/insert_game_info', { game_line, status, img, time11, time12, time2, time3, time41, time42 })
